<#assign decorator=JspTaglibs["http://www.opensymphony.com/sitemesh/decorator"] />
<#assign currentActionName="${currentUrlHashCode!}" />
<#assign base="${rc.contextPath}" />
<#assign spring=JspTaglibs["http://www.springframework.org/tags/form"] />
<#assign urltoken="${rc.contextPath}/tools/tokenJson" />
<#assign urltoken2="${rc.contextPath}/tools/token2Json" />
<#assign urltoken3="${rc.contextPath}/tools/token3Json" />
<#assign urllastupdatelog="${rc.contextPath}/log/operationAdminJsonLastUpdate" />
<#assign urlattachmentView="${rc.contextPath}/info/attachmentJsonView" />
<#assign urlread="${rc.contextPath}/porm/readJson" />
<#assign urlqueryread="${rc.contextPath}/porm/queryReadJson" />
<script type="text/javascript">
		//当前环境路径
		var contextPath = "${rc.contextPath}";
		var currentActionName = "${currentActionName}";
		//设置分页请求地址
		var urllist = "${urllist?default("")}";
		//设置详情请求地址
		var urldetail = "${urldetail?default("")}";
		//设置添加表单初始值
		var urladdforminit = "${urladdforminit?default("")}";
		//设置保存实体变量地址
		var urlsave = "${urlsave?default("")}";
		//设置修改实体变量地址
		var urlupdate = "${urlupdate?default("")}";
		//设置删除实体变量地址
		var urldelete = "${urldelete?default("")}";
		//设置恢复实体变量地址
		var urlrenew = "${urlrenew?default("")}";
		//设置最后操作日志地址
		var urllastupdatelog = "${urllastupdatelog?default("")}";
		//附件
		var urlattachmentView = "${urlattachmentView?default("")}";
		//设置token变量
		var token = "${CoreConstants.TOKEN_KEY}${currentActionName}";
		var token2 = "${CoreConstants.TOKEN_KEY2}${currentActionName}";
		var token3 = "${CoreConstants.TOKEN_KEY3}${currentActionName}";
		//设置新增加、修改、删除对话框的标题
		//详情
		var detailTitle = "<@i18n.message "button.detail.title"/>";
		//保存
		var saveTitle = "<@i18n.message "global.add.title"/>";
		//修改
		var updateTitle = "<@i18n.message "global.edit.title"/>";
		//删除
		var deleteTitle = "<@i18n.message "global.delete.title"/>";
		//删除确认
		var deleteConfirm = "<@i18n.message "global.delete.confirm"/>";
		//恢复确认
		var renewConfirm = "<@i18n.message "global.renew.confirm"/>";
		
		//设置分页表格ID，保证唯一
		var dg = "dg${currentActionName}";
		//设置新增、修改对话框ID，保证唯一
		var dlg = "dlg${currentActionName}";
		//设置表单ID，保证唯一
		var fm = "fm${currentActionName}";
		//设置工具BAR ID，保证唯一
		var toolbar = "toolbar${currentActionName}";
		
		var pageList = [10,20,30,50];
		
		var urltoken = "${urltoken}";
		var urltoken2 = "${urltoken2}";
		var urltoken3 = "${urltoken3}";
		var IS_READ = true;
		var QUERY_IS_READ = true;
		
		function isRead() {
			var rs = false;
			$.ajax({
				type : "get",
				url : "${urlread}",
				async : false,
				success : function(result) {
					rs =  result;
				}
			});
			return rs;
		}
		function isQueryRead() {
			var rs = false;
			$.ajax({
				type : "get",
				url : "${urlqueryread}",
				async : false,
				success : function(result) {
					rs =  result;
				}
			});
			return rs;
		}
		IS_READ = isRead();
		QUERY_IS_READ = isQueryRead();
</script>
